package com.xtgg.sys;

public class Constants {
	public static final boolean DEBUG_MODE = true;

	public static final String GUIDE_FIRST_LOGIN_Preferences_KEY = "firstLogin";
	public static final String ABOUT_GUIDE = "GUIDE_INFO";

	/** 接口根地址 **/

	public static final String HOME_ADDRESS_TEST = "http://103.227.76.55:8083/XTGGInt/";
	public static final String HOME_ADDRESS_OFFICAL = "http://103.227.76.55:8083/XTGGInt/";

	public static final String USERMGT = Config.getHomeUrl() + "usermgt.do";
	public static final String INFOMGT = Config.getHomeUrl() + "infomgt.do";
	public static final String JOINACT = Config.getHomeUrl() + "joinaccept.do";
	public static final String EACODE = Config.getHomeUrl() + "eacode.do";
	public static final String SETTING = Config.getHomeUrl() + "settingMgt.do";
	public static final String INITTIAL = Config.getHomeUrl() + "initialize.do";
	public static final String DEVICEMGT = Config.getHomeUrl() + "devicemgt.do";

	public static final String PIC_PATH = "/mnt/sdcard/" + "xtgg_tmp" + ".jpg";
	public static final String PIC_PATH_0 = "/mnt/sdcard/" + "xtgg_tmp_0"
			+ ".jpg";
	public static final String PIC_PATH_1 = "/mnt/sdcard/" + "xtgg_tmp_1"
			+ ".jpg";

	/*************** SHARE_PREFERENCE_CONST******start *****************************/
	/** @Description share preference const : cell phone number */
	public static final String KEY_CELLPHONE_NUMBER = "phonenumber";

	/** @Description share preference const : cell phone unikey */
	public static final String KEY_CELLPHONE_UNIKEY = "unikey";

	/** @Description share preference const : filter json string */
	public static final String KEY_FILTER_JSON = "filter";
	public static final String KEY_IS_ORDER = "isorder";

	/*************** SHARE_PREFERENCE_CONST*******end ******************************/

	public static class Config {
		public static boolean IS_TEST = false;

		public static String getHomeUrl() {
			if (IS_TEST) {
				return HOME_ADDRESS_TEST;
			} else {
				return HOME_ADDRESS_OFFICAL;
			}

		}

		public static String getHomePort() {
			return "http://61.187.84.70:9081/";
		}

		public static void setTest(boolean isTest) {
			IS_TEST = isTest;
		}

		public static String getOffice() {
			if (IS_TEST) {
				return "测试环境";
			} else {
				return "正式环境";
			}
		}
	}

}
